package com.sc.nft.task;

import com.sc.nft.enums.CycleCollectionEnum;
import com.sc.nft.service.SecondCollectionService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
@Slf4j
public class ZhiTanApiTask {

    private final SecondCollectionService secondCollectionService;
    /**
     * 获取当前藏品列表
     *
     * @throws Exception
     */
    @XxlJob("insertCycleCollection")
    public void insertCycleCollection() {
        //智探插入藏品列表
        secondCollectionService.insertCycleCollection(CycleCollectionEnum.ZHI_TAN);
        //盯链插入大盘走势
        secondCollectionService.insertCycleCollection(CycleCollectionEnum.DING_LIAN);
    }
}
